package cn.itcast.mapreduce;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class MyPartitioner extends Partitioner<Text, LongWritable> {

    public int getPartition(Text text, LongWritable longWritable, int i) {
        return text.toString().length() >= 5 ? 0 : 1;
    }
}
